<!DOCTYPE HTML>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../css/aui/aui-win.css" />
		<link rel="stylesheet" type="text/css" href="../css/iconfont/iconfont.css" />
		<style type="text/css">
			.display-none {
				display: none;
			}
			#aui-footer .aui-iconfont {
				font-size: 25px;
			}
			#aui-footer {
				background: #f7f7f7;
				border-top: 1px solid #e2e2e2;
			}
			.aui-bar-1d9dd5 {
				background: #1d9dd5;
			}
			#aui-footer li.active-1d9dd5, #aui-footer li.active-1d9dd5 span.iconfont {
				color: #1d9dd5 !important;
			}
		</style>
	</head>
	<body>
		<header class="aui-bar aui-bar-nav aui-bar-1d9dd5 header" id='case-header'>
			<a class="aui-pull-left" tapmode onclick="H.openSlidPane();"> <span class="aui-iconfont iconfont icon-caidan"></span> </a>
			<div class="aui-title">
				葵花宝典
			</div>
		</header>
		<header class="aui-bar aui-bar-nav aui-bar-1d9dd5 header display-none" id='bbs-header'>
			<a class="aui-pull-left" tapmode onclick="H.openSlidPane();"> <span class="aui-iconfont iconfont icon-caidan"></span> </a>
			<div class="aui-title">
				指点迷津
			</div>
		</header>
		<header class="aui-bar aui-bar-nav aui-bar-1d9dd5 header display-none" id='shareFind-header'>
			<a class="aui-pull-left" tapmode onclick="H.openSlidPane();"> <span class="aui-iconfont iconfont icon-caidan"></span> </a>
			<div class="aui-title">
				流连忘返
			</div>
			<a class="aui-pull-right" tapmode id="push-findShare"> <span class="aui-iconfont iconfont icon-tianjia"></span> </a>
		</header>
		<header class="aui-bar aui-bar-nav aui-bar-1d9dd5 header display-none" id='ucenter-header'>
			<a class="aui-pull-left" tapmode onclick="H.openSlidPane();"> <span class="aui-iconfont iconfont icon-caidan"></span> </a>
			<div class="aui-title">
				分寸之席
			</div>
			<a class="aui-pull-right" tapmode > 签到 </a>
		</header>
		<footer class="aui-nav" id="aui-footer">
			<ul class="aui-bar-tab">
				<li class="active-1d9dd5" data-header="case-header" tapmode>
					<span class="aui-iconfont iconfont icon-anli"></span>
					<p>
						葵花宝典
					</p>
				</li>
				<li data-header="bbs-header" tapmode >
					<span class="aui-iconfont iconfont icon-b"></span>
					<p>
						指点迷津
					</p>
				</li>
				<li data-header="shareFind-header" tapmode >
					<span class="aui-iconfont iconfont icon-faxian"></span>
					<p>
						流连忘返
					</p>
				</li>
				<li data-header="ucenter-header" tapmode >
					<span class="aui-iconfont iconfont icon-user_set"></span>
					<p>
						分寸之席
					</p>
				</li>
			</ul>
		</footer>
	</body>
	<script type="text/javascript" src="../script/AHelper.js"></script>
	<script type="text/javascript" src="../script/zepto.min.js"></script>
	<script type="text/javascript">
		var groupName = "indexGroup";
		function setHeaderFootInfo(index) {
			var that = $("#aui-footer li").eq(index);
			var headerId = that.attr("data-header");
			that.addClass("active-1d9dd5").siblings("#aui-footer li").removeClass("active-1d9dd5");
			$("#" + headerId).removeClass("display-none").siblings(".header").addClass("display-none");
			// 设置沉浸式状态栏
			H.$fixStatusBar(function(offset) {
				if (headerId == "bbs-header") {
					H.$setFrameStatus('bbs_data_body', false);
				} else {
					H.$setFrameStatus('bbs_data_body', true);
				}
			}, headerId);
		}

		Zepto(function($) {
			$("#aui-footer li").on("tap", function() {
				var index = $(this).index();
				setHeaderFootInfo(index);
				H.$setFrameGroupIndex(groupName, index);
			});
			// 发布所见所闻
			$("#push-findShare").on("tap", function() {
				// 快速打开窗口
				H.$openFrame('push_findShare', './case/push_findShare.html', null, {
					x : 0,
					y : 0
				});
			});
		});
		H.ready(function() {
			H.$openFrameGroupWithNav(function(ret, err) {
				setHeaderFootInfo(ret.index);
			}, 'case-header', {
				name : groupName,
				frames : [{
					url : 'case/case_body.html',
					name : 'case_body',
					bounces : true
				}, {
					url : 'bbs/bbs_body.html',
					name : 'bbs_body',
					bounces : true
				}, {
					url : 'shareFind/shareFind_body.html',
					name : 'shareFind_body',
					bounces : true
				}, {
					url : 'ucenter/ucenter_body.html',
					name : 'ucenter_body',
					bounces : true
				}],
				preload : 3,
				scrollEnabled : false
			}, 'aui-footer');
			// 双击退出应用，并清除缓存
			H.$dblclickToCloseApp();
		});
	</script>
</html>